<template>
  <div>
    <div class="roof">
      <div class="roof_div">
        <p>当前定位城市</p>
        <button>杭州</button>
      </div>
      <div class="roof_first">
        <p>历史选择</p>
        <button>杭州</button>
      </div>
    </div>
    <van-index-bar :index-list="indexList">
      <van-index-anchor index="1">A</van-index-anchor>
      <van-cell title="安康" />
      <van-cell title="安庆" />
      <van-cell title="安顺" />

      <van-index-anchor index="2">B</van-index-anchor>
      <van-cell title="贝勒宁" />
      <van-cell title="阿坝" />

      <van-index-anchor index="3">C</van-index-anchor>
      <van-cell title="长治" />
      <van-cell title="池州" />
      <van-cell title="朝阳" />

      <van-index-anchor index="4">D</van-index-anchor>
      <van-cell title="达州" />
      <van-cell title="丹东" />
      <van-cell title="定西" />
    </van-index-bar>
  </div>
</template>

<script>
export default {
  data() {
    return {
      indexList: ['定位','历史','全部','a','b','c','d','e','f','g','h','i','g'],
    };
  },
};
</script>

<style lang="scss" scoped>
.roof {
  width: 100%;
  background-color: #fff;
  padding:15px 15px 0 15px ;
  .roof_div{
    p{
      font-size: 13px;
      color: #666666;
    }
    button{
      width: 77px;
      height: 35px;
      border: 1px solid #1cbc76;
      border-radius: 5px;
      color: #00be88;
      font-size: 14px;
      background-color: #f2fbf7;
      margin: 10px 0;
    }
  }
  .roof_first{
    p{
      font-size: 13px;
      color: #666666;
    }
    button{
      width: 77px;
      height: 35px;
      border: 1px solid #1cbc76;
      border-radius: 5px;
      color: #00be88;
      font-size: 14px;
      background-color: #f2fbf7;
      margin-top:10px;
      margin-bottom: 20px;
    }
  }
}
::v-deep(.van-index-bar__sidebar){
  color: #00be88;
}
</style>
